﻿using System;
using System.Collections.Generic;
using System.Text;

namespace ifelse
{
    public class ifelseif嵌套
    {
        public static void Demo()
        {
            int type = 1;
            int start = 2;
            if (type == 1) { }
            else if (type == 2)
            {
                if (start == 1) { }
                else { }
            }
        }



        public static void Demo优化()
        {
            int type = 1;
            int start = 2;
            if (type == 2 && start == 1) { return; }
            if (type == 2 && start == 2) { return; }
            if (type == 1) { return; }



        }





    }
}
